import React from 'react';

export const useIfElseNodeCompareOperator = (
  type
): React.ReactElement | string => {
  if (type === 'contains') {
    return (
      <svg
        className="icon-icon icon-icon-coz_proper_superset "
        width="1em"
        height="1em"
        viewBox="0 0 24 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M20 12C20 7.85786 16.6421 4.5 12.5 4.5H6C5.44771 4.5 5 4.94772 5 5.5C5 6.05228 5.44771 6.5 6 6.5H12.5C15.5376 6.5 18 8.96243 18 12C18 15.0376 15.5376 17.5 12.5 17.5H6C5.44771 17.5 5 17.9477 5 18.5C5 19.0523 5.44771 19.5 6 19.5H12.5C16.6421 19.5 20 16.1421 20 12Z"></path>
      </svg>
    );
  }
  if (type === 'not_contains') {
    return (
      <svg
        className="icon-icon icon-icon-coz_proper_superset_slash "
        width="1em"
        height="1em"
        viewBox="0 0 24 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M4.22075 18.364C3.83023 18.7545 3.83023 19.3877 4.22075 19.7782 4.61127 20.1687 5.24444 20.1687 5.63496 19.7782L19.7771 5.63606C20.1676 5.24554 20.1676 4.61237 19.7771 4.22185 19.3866 3.83132 18.7534 3.83133 18.3629 4.22185L4.22075 18.364zM8.03338 19.5L10.0334 17.5H12.4978C15.5354 17.5 17.9978 15.0376 17.9978 12 17.9978 11.2701 17.8556 10.5733 17.5974 9.93598L19.0982 8.43525C19.672 9.49555 19.9978 10.7097 19.9978 12 19.9978 16.1422 16.64 19.5 12.4978 19.5H8.03338zM15.386 5.07631L13.8058 6.6565C13.3866 6.55424 12.9486 6.50002 12.4978 6.50002H5.99785C5.44556 6.50002 4.99785 6.05231 4.99785 5.50002 4.99785 4.94774 5.44556 4.50002 5.99785 4.50002H12.4978C13.5214 4.50002 14.4971 4.70506 15.386 5.07631z"></path>
      </svg>
    );
  }
  if (type === 'empty') {
    return (
      <svg
        className="icon-icon icon-icon-coz_equal "
        width="1em"
        height="1em"
        viewBox="0 0 25 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M4.177 8C3.62472 8 3.177 8.44772 3.177 9 3.177 9.55228 3.62472 10 4.177 10H20.177C20.7293 10 21.177 9.55228 21.177 9 21.177 8.44772 20.7293 8 20.177 8H4.177zM4.177 14C3.62472 14 3.177 14.4477 3.177 15 3.177 15.5523 3.62472 16 4.177 16H20.177C20.7293 16 21.177 15.5523 21.177 15 21.177 14.4477 20.7293 14 20.177 14H4.177z"></path>
      </svg>
    );
  }
  if (type === 'not_empty') {
    return (
      <svg
        className="icon-icon icon-icon-coz_equal_slash "
        width="1em"
        height="1em"
        viewBox="0 0 24 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M4.22188 18.364C3.83136 18.7545 3.83136 19.3877 4.22188 19.7782 4.61241 20.1687 5.24557 20.1687 5.6361 19.7782L19.7782 5.63606C20.1688 5.24554 20.1688 4.61237 19.7782 4.22185 19.3877 3.83132 18.7545 3.83132 18.364 4.22185L4.22188 18.364zM4 8H12.4645L10.4645 10H4C3.44772 10 3 9.55229 3 9 3 8.44772 3.44772 8 4 8zM4 14H6.46445L4.46445 16H4C3.44772 16 3 15.5523 3 15 3 14.4477 3.44772 14 4 14zM13.5355 14L11.5355 16H20C20.5523 16 21 15.5523 21 15 21 14.4477 20.5523 14 20 14H13.5355zM19.5355 8L17.5355 10H20C20.5523 10 21 9.55229 21 9 21 8.44772 20.5523 8 20 8H19.5355z"></path>
      </svg>
    );
  }
  if (type === 'is') {
    return '是';
  }
  if (type === 'is_not') {
    return '不是';
  }
  if (type === 'start_with') {
    return '开始是';
  }
  if (type === 'end_with') {
    return '结束是';
  }
  if (type === 'eq') {
    return (
      <svg
        className="icon-icon icon-icon-coz_equal "
        width="1em"
        height="1em"
        viewBox="0 0 25 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M4.177 8C3.62472 8 3.177 8.44772 3.177 9 3.177 9.55228 3.62472 10 4.177 10H20.177C20.7293 10 21.177 9.55228 21.177 9 21.177 8.44772 20.7293 8 20.177 8H4.177zM4.177 14C3.62472 14 3.177 14.4477 3.177 15 3.177 15.5523 3.62472 16 4.177 16H20.177C20.7293 16 21.177 15.5523 21.177 15 21.177 14.4477 20.7293 14 20.177 14H4.177z"></path>
      </svg>
    );
  }
  if (type === 'ne') {
    return (
      <svg
        className="icon-icon icon-icon-coz_equal_slash "
        width="1em"
        height="1em"
        viewBox="0 0 24 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M4.22188 18.364C3.83136 18.7545 3.83136 19.3877 4.22188 19.7782 4.61241 20.1687 5.24557 20.1687 5.6361 19.7782L19.7782 5.63606C20.1688 5.24554 20.1688 4.61237 19.7782 4.22185 19.3877 3.83132 18.7545 3.83132 18.364 4.22185L4.22188 18.364zM4 8H12.4645L10.4645 10H4C3.44772 10 3 9.55229 3 9 3 8.44772 3.44772 8 4 8zM4 14H6.46445L4.46445 16H4C3.44772 16 3 15.5523 3 15 3 14.4477 3.44772 14 4 14zM13.5355 14L11.5355 16H20C20.5523 16 21 15.5523 21 15 21 14.4477 20.5523 14 20 14H13.5355zM19.5355 8L17.5355 10H20C20.5523 10 21 9.55229 21 9 21 8.44772 20.5523 8 20 8H19.5355z"></path>
      </svg>
    );
  }
  if (type === 'gt') {
    return (
      <svg
        className="icon-icon icon-icon-coz_greater "
        width="1em"
        height="1em"
        viewBox="0 0 25 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M19.9345 12.411C19.8856 12.5199 19.8169 12.6206 19.7301 12.7073C19.6634 12.7741 19.5884 12.8301 19.5078 12.8747L7.83147 19.6161C7.35317 19.8922 6.74158 19.7283 6.46544 19.25C6.1893 18.7718 6.35317 18.1602 6.83147 17.884L17.0228 12L6.83147 6.11607C6.35317 5.83993 6.1893 5.22834 6.46544 4.75004C6.74158 4.27175 7.35317 4.10788 7.83147 4.38402L19.5078 11.1254C19.5884 11.17 19.6634 11.226 19.7301 11.2928C19.8169 11.3795 19.8856 11.4802 19.9345 11.5891C19.9944 11.7215 20.0231 11.8616 20.023 12C20.0231 12.1385 19.9944 12.2786 19.9345 12.411Z"></path>
      </svg>
    );
  }
  if (type === 'ge') {
    return (
      <svg
        className="icon-icon icon-icon-coz_greater_equal "
        width="1em"
        height="1em"
        viewBox="0 0 25 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M7.78529 4.41006C7.27504 4.19871 6.69008 4.44101 6.47873 4.95126 6.26738 5.4615 6.50968 6.04647 7.01992 6.25782L16.3369 10.117 7.02015 13.9762C6.5099 14.1875 6.2676 14.7725 6.47895 15.2827 6.6903 15.793 7.27527 16.0353 7.78552 15.8239L19.2963 11.056C19.5491 10.963 19.7638 10.7687 19.875 10.5002 19.9077 10.4213 19.9295 10.3406 19.9412 10.2598 19.9663 10.0875 19.9467 9.90638 19.8752 9.73383 19.7634 9.46396 19.5471 9.26905 19.2926 9.17656L7.78529 4.41006zM6.47895 19.049C6.2676 18.5388 6.5099 17.9538 7.02015 17.7424L18.5686 12.9589C19.0789 12.7475 19.6639 12.9899 19.8752 13.5001 20.0866 14.0103 19.8443 14.5953 19.334 14.8067L7.78552 19.5902C7.27527 19.8016 6.6903 19.5592 6.47895 19.049z"></path>
      </svg>
    );
  }
  if (type === 'lt') {
    return (
      <svg
        className="icon-icon icon-icon-coz_less "
        width="1em"
        height="1em"
        viewBox="0 0 25 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M4.4195 11.589C4.46847 11.4801 4.53714 11.3794 4.62394 11.2927C4.69063 11.2259 4.76562 11.1699 4.84624 11.1253L16.5226 4.38393C17.0009 4.10779 17.6124 4.27166 17.8886 4.74995C18.1647 5.22825 18.0009 5.83984 17.5226 6.11598L7.33122 12L17.5226 17.8839C18.0009 18.1601 18.1647 18.7717 17.8886 19.25C17.6124 19.7282 17.0009 19.8921 16.5226 19.616L4.84622 12.8746C4.76561 12.83 4.69062 12.774 4.62394 12.7072C4.53714 12.6205 4.46846 12.5198 4.41949 12.4109C4.35959 12.2785 4.33093 12.1384 4.33106 12C4.33093 11.8615 4.35959 11.7214 4.4195 11.589Z"></path>
      </svg>
    );
  }
  if (type === 'le') {
    return (
      <svg
        className="icon-icon icon-icon-coz_less_equal "
        width="1em"
        height="1em"
        viewBox="0 0 25 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M16.5686 4.41012C17.0789 4.19877 17.6639 4.44107 17.8752 4.95132 18.0866 5.46156 17.8443 6.04653 17.334 6.25788L8.01701 10.1171 17.3338 13.9762C17.844 14.1876 18.0863 14.7726 17.875 15.2828 17.6636 15.793 17.0787 16.0354 16.5684 15.824L5.05765 11.0561C4.80485 10.963 4.59017 10.7687 4.47895 10.5002 4.44627 10.4213 4.42444 10.3407 4.41277 10.2598 4.38766 10.0875 4.40725 9.90645 4.47873 9.7339 4.59051 9.46402 4.80681 9.26911 5.06129 9.17662L16.5686 4.41012zM17.875 19.0491C18.0863 18.5388 17.844 17.9539 17.3338 17.7425L5.78529 12.959C5.27505 12.7476 4.69008 12.9899 4.47873 13.5002 4.26738 14.0104 4.50968 14.5954 5.01992 14.8067L16.5684 19.5903C17.0787 19.8016 17.6636 19.5593 17.875 19.0491z"></path>
      </svg>
    );
  }
  if (type === 'null') {
    return (
      <svg
        className="icon-icon icon-icon-coz_equal "
        width="1em"
        height="1em"
        viewBox="0 0 25 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M4.177 8C3.62472 8 3.177 8.44772 3.177 9 3.177 9.55228 3.62472 10 4.177 10H20.177C20.7293 10 21.177 9.55228 21.177 9 21.177 8.44772 20.7293 8 20.177 8H4.177zM4.177 14C3.62472 14 3.177 14.4477 3.177 15 3.177 15.5523 3.62472 16 4.177 16H20.177C20.7293 16 21.177 15.5523 21.177 15 21.177 14.4477 20.7293 14 20.177 14H4.177z"></path>
      </svg>
    );
  }
  if (type === 'not_null') {
    return (
      <svg
        className="icon-icon icon-icon-coz_equal_slash "
        width="1em"
        height="1em"
        viewBox="0 0 24 24"
        fill="currentColor"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path d="M4.22188 18.364C3.83136 18.7545 3.83136 19.3877 4.22188 19.7782 4.61241 20.1687 5.24557 20.1687 5.6361 19.7782L19.7782 5.63606C20.1688 5.24554 20.1688 4.61237 19.7782 4.22185 19.3877 3.83132 18.7545 3.83132 18.364 4.22185L4.22188 18.364zM4 8H12.4645L10.4645 10H4C3.44772 10 3 9.55229 3 9 3 8.44772 3.44772 8 4 8zM4 14H6.46445L4.46445 16H4C3.44772 16 3 15.5523 3 15 3 14.4477 3.44772 14 4 14zM13.5355 14L11.5355 16H20C20.5523 16 21 15.5523 21 15 21 14.4477 20.5523 14 20 14H13.5355zM19.5355 8L17.5355 10H20C20.5523 10 21 9.55229 21 9 21 8.44772 20.5523 8 20 8H19.5355z"></path>
      </svg>
    );
  }
  return type;
};
